package com.shd.edanpei.ui.view;

import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.widget.LinearLayout;

import com.shd.edanpei.R;
import com.shd.edanpei.ui.adapter.ItemOrderInfoAdapter;
import com.shd.edanpei.bean.OrderDetailsModel;

/**
 * Created by mc on 2018/9/20.
 * 车辆订单 订单所需材料
 */

public class CustomerNeedView extends LinearLayout {

    private OrderDetailsModel model;


    private ItemOrderInfoAdapter mAdapter;

    public CustomerNeedView(Context context, OrderDetailsModel model) {
        super(context);
        this.model = model;
        initView();
    }


    private void initView() {
        LayoutInflater.from(getContext()).inflate(R.layout.order_customer_need, this);
        RecyclerView recyclerView = findViewById(R.id.recycler_view);
        mAdapter = new ItemOrderInfoAdapter(getContext());
        recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
        recyclerView.setAdapter(mAdapter);
        mAdapter.setNewData(model.getCustomerNeedList());
    }

}
